home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PROT018S.ZIP / PROTMAP.DOC < prev    next >
Text File  |  1993-01-07  |  9KB  |  224 lines

  1.  
  2.  
  3. Basic States table for each of the protocols. There is a Rosetta Stone at
  4. the bottom of the document.
  5.  
  6. I can't claim copyright for these tables, but they do work.
  7.  
  8. Mark Dignam - Perth Omen BBS - 3:690/660.0@Fidonet
  9.  
  10. -------------------------------------------------------------------------------
  11.  
  12. Xmodem CheckSum
  13.  
  14. Sender                                       Receiver
  15.                                                 NAK
  16.                                                 NAK
  17. SOH 01 FE data[128] sum
  18.                                                 ACK
  19. SOH 02 FD data[128] sum
  20.                                                 NAK
  21. SOH 02 FD data[128] sum
  22.                                                 ACK
  23. SOH 03 FC data[128] sum
  24.                                                 ACK
  25. SOH 04 FB data[100] 1A[28] sum
  26.                                                 ACK
  27. EOT
  28.                                                 ACK
  29.  
  30. -------------------------------------------------------------------------------
  31.  
  32. Xmodem CRC
  33.  
  34. Sender                                     Receiver
  35.                                                 C
  36.                                                 C
  37. SOH 01 FE data[128] crchi crclo
  38.                                                 ACK
  39. SOH 02 FD data[128] crchi crclo
  40.                                                 NAK
  41. SOH 02 FD data[128] crchi crclo
  42.                                                 ACK
  43. SOH 03 FC data[128] crchi crclo
  44.                                                 ACK
  45. SOH 04 FB data[100] 1A[28] crchi crclo
  46.                                                 ACK
  47. EOT
  48.                                                 ACK
  49. -------------------------------------------------------------------------------
  50.  
  51. Ymodem Batch (usually CRC!)
  52.  
  53. Sender                                     Receiver
  54.                                                 C
  55.                                                 C
  56. SOH 00 FF Y/Zmodem Header[128] crchi crclo
  57.                                                 ACK
  58.                                                 C
  59.  
  60. STX 01 FE data[1024] crchi crclo
  61.                                                 ACK
  62. STX 02 FD data[1024] crchi crclo
  63.                                                 NAK
  64. STX 02 FD data[1024] crchi crclo
  65.                                                 ACK
  66. STX 03 FC data[1024] crchi crclo
  67.                                                 ACK
  68. STX 04 FB data[1024] crchi crclo
  69.                                                 ACK
  70. EOT
  71.                                                 ACK
  72.                                                 C
  73. SOH 00 FF NUL[128]
  74.  
  75. -----------------------------------------------------------------------------
  76. Ymodem-G Batch (usually CRC!)  Sender just looks for NAK. Single Nak bombs
  77.                                Transfer.
  78.  
  79. Sender                                     Receiver
  80.                                                 G
  81.                                                 G
  82. SOH 00 FF Y/Zmodem Header[128] crchi crclo
  83.                                                 G
  84.  
  85. STX 01 FE data[1024] crchi crclo
  86. STX 02 FD data[1024] crchi crclo
  87. STX 03 FC data[1024] crchi crclo
  88. STX 04 FB data[1024] crchi crclo
  89. EOT
  90.                                                 ACK
  91.                                                 G
  92. SOH 00 FF NUL[128]
  93.                                                 ACK
  94.  
  95. -------------------------------------------------------------------------------
  96. Sealink - Don't wait for the ACK's, if they start arriving, just make sure
  97.           they stay within 6 blocks of blocks being sent.
  98.  
  99. Sender                                         Receiver
  100.                                                 C
  101.                                                 C
  102. SOH 00 FF SealinkHeader[128] crchi crclo
  103.                                                 ACK 00 FF
  104. SOH 01 FE data[128] crchi crclo
  105.                                                 ACK 01 FE
  106. SOH 02 FD data[128] crchi crclo
  107.                                                 NAK 02 FD
  108. SOH 02 FD data[128] crchi crclo
  109.                                                 ACK 02 FD
  110. SOH 03 FC data[128] crchi crclo
  111.                                                 ACK 03 FC
  112. SOH 04 FB data[100] 1A[28] crchi crclo
  113.                                                 ACK 04 FB
  114. EOT
  115.                                                 ACK 05 FA
  116.                                                 C
  117. SOH 00 FF NUL[128] crchi crclo
  118.                                                 ACK 00 FF
  119.  
  120. -------------------------------------------------------------------------------
  121. Zmodem - for futher on this - find Chuck Forsbergs document on the Zmodem
  122.          protocol. Its a bit much to go into here, but basicly the ^X char,
  123.          which is called a ZDLE, is the whole key. To send a ^X as part of
  124.          data, you must send a $18,$58, etc.
  125.  
  126.          The various 'frames' (the ZRINIT, ZDATA etc) start with a ZDLE and
  127.          are fully variable depending on the exact frame type, the method of
  128.          Crc (CRC16 or CRC32) and the flags which are exchanged between each
  129.          system at start of transmission
  130.  
  131. Sender                                         Receiver
  132.  
  133. ZRQINIT XON
  134.                                                 ZRINIT
  135. ZFILE
  136.                                                 ZRPOS
  137. ZDATA
  138. data[1024] crchi crclo
  139. data[1024] crchi crclo
  140. data[1024] crchi crclo
  141. ZEOF
  142.                                                 ZRINIT
  143. ZFIN
  144.                                                 ZFIN
  145. OO
  146.  
  147. -------------------------------------------------------------------------------
  148. Yapp - This is a specialised protocol used (at this stage) only on Packet
  149.        Radio. It requires a error link end to end, but compared to say
  150.        YmodemG or Zmodem, is a bit of a slug!
  151.  
  152.        Lenblock is sent as a byte, and therefore Max Blocksize is 256.
  153.  
  154. Sender                                         Receiver
  155.  
  156. ENQ SOH
  157.                                                 ACK SOH
  158. SOH lenblock filename NUL size_in_ascii nul
  159.                                                 ACK STX
  160. STX lenblock data[lenblock]
  161. STX lenblock data[lenblock]
  162. STX lenblock data[lenblock]  {until eof}
  163.  
  164. BRK SOH
  165.                                                 ACK BRK
  166. If more files - goto SOH lenblock etc, else
  167.  
  168. EOT SOH
  169.                                                 ACK EOT
  170.  
  171. -------------------------------------------------------------------------------
  172.  
  173. Ahh The Rosetta Stone.
  174.  
  175. SOH       = $01
  176. STX       = $02
  177. BRK       = $03
  178. EOT       = $04
  179. ENQ       = $05
  180. ACK       = $06
  181. NAK       = $15
  182. CAN       = $18
  183. CRCNAK    = $43
  184. YGNak     = $47
  185. ZDLE      = $18
  186.  
  187. Ymodem/Zmodem header block. Ymodem pads it out to 128 bytes with nulls, Zmodem
  188. just sends it as is.
  189.  
  190. record =
  191.         filename : array[1..max] of char; { must be in lower case! Terminated }
  192.                                           { with a null, and remove paths if  }
  193.                                           { you like, but you don't have to.  }
  194.                                           { if path left in, must use '/', ala}
  195.                                           { unix, not '\' ala dos             }
  196.         separator : byte = $00            { End of filename                   }
  197.         length    : array[1..max] of char { this is optional, and is sent in  }
  198.                                           { ASCII, using decimal digits from  }
  199.                                           { $30..$39                          }
  200.         Separator : byte = $20            { separates the length and the time }
  201.         datetime  : array[1..11] of char  { Date time of the file in unix     }
  202.                                           { style, ie number of seconds since }
  203.                                           { 00:00 1/1/1970. Is sent in OCTAL  }
  204.                                           { ASCII, using digits from $30..$37 }
  205.         separator : byte = $00            { End of datetime                   }
  206. end;
  207.  
  208.  
  209. Sealink is a little bit different - but send similar info.
  210.  
  211. Record =
  212.         Length    : Longint              { length of file in standard Intel   }
  213.                                          { Hi_lo format                       }
  214.         TimeDate  : Longint              { TimeStamp of file, in standard     }
  215.                                          { MSDOS format                       }
  216.         Filename  : array[0..16] of char { filename , terminated with a null  }
  217.         ProgName  : array[0..14] of char { sending programs name.             }
  218.         Ackless   : Boolean              { Can handle overdrive.              }
  219.         Fill      : array[0..86] of char { Nulls                              }
  220. end;
  221.  
  222. -------------------------------------------------------------------------------
  223.  
  224.